import { Observable } from 'rxjs'

import {
  IAcquirerQueryParams,
  Acquirer,
  IInstitutionPagination,
  IUpdateAcquirerBaseInfo,
  IUpdateAcquirerTradeInfo,
  IUpdateAcquirerAudit,
  IUpdateAcquirerSettlement,
  IUpdateAcquirerQRFeature,
  IUpdateAcquirerCardFeature,
  QrChannel,
  ECUPIChannel,
  IUpdateAcquirerFeature
} from '@shared/interfaces/acquirer'
import { ECategoryUrl } from '@shared/interfaces/trade'

export abstract class AcquirerService {
  abstract getList(queryParams: IAcquirerQueryParams): Observable<IInstitutionPagination>

  abstract getOne(insCode: string): Observable<Acquirer>

  abstract delete(insCode: string): Observable<boolean>

  abstract create(acq: Acquirer): Observable<Acquirer>

  abstract updateBaseInfoOfAcquirer(data: IUpdateAcquirerBaseInfo, insCode: string): Observable<Acquirer>

  abstract updateQRFeaturesOfAcquirer(data: IUpdateAcquirerQRFeature, insCode: string): Observable<Acquirer>

  abstract updateCardFeaturesOfAcquirer(data: IUpdateAcquirerCardFeature, insCode: string): Observable<Acquirer>

  abstract updateTradeInfoOfAcquirer(data: IUpdateAcquirerTradeInfo, insCode: string): Observable<Acquirer>

  abstract updateFeaturesOfAcquirer(data: IUpdateAcquirerFeature, insCode: string): Observable<Acquirer>

  abstract updateAuditOfAcquirer(data: IUpdateAcquirerAudit, insCode: string): Observable<Acquirer>

  abstract updateSettlementAcquirer(data: IUpdateAcquirerSettlement, insCode: string): Observable<Acquirer>

  abstract updateChannelForAcquirer(category: ECategoryUrl, insCode: string, id: string, body: QrChannel): Observable<boolean>

  abstract deleteChannelForAcquirer(category: ECategoryUrl, insCode: string, id: string): Observable<boolean>

  abstract createChannelForAcquirer(category: ECategoryUrl, insCode: string, channel: QrChannel): Observable<boolean>

  abstract getExistedChannel(chanCode: string, chanMerID: string, category: ECategoryUrl): Observable<QrChannel>

  abstract freeze(insCode: string): Observable<boolean>

  abstract unfreeze(insCode: string): Observable<boolean>

  abstract updateEcChannelForAcquirer(category: ECategoryUrl, insCode: string, id: string, body: ECUPIChannel): Observable<boolean>

  abstract deleteEcChannelForAcquirer(category: ECategoryUrl, insCode: string, id: string): Observable<boolean>

  abstract createEcChannelForAcquirer(category: ECategoryUrl, insCode: string, channel: ECUPIChannel): Observable<boolean>
}
